import logging

fmt = '%(asctime)s-%(filename)s第%(lineno)s行，级别：%(levelname)s错误信息：%(message)s'

logging.basicConfig(filename='日志.log',filemode='a',format=fmt,level=logging.DEBUG)

logging.debug('this is a debug')
